package com.aya.aopx.invalid;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

@Service
@Aspect
public class CustomAspect {

    @Pointcut("execution(public * com.aya.aopx.invalid..*(..))")
    public void pointA() {
    }

    private static final Logger logger = LoggerFactory.getLogger(CustomAspect.class);

    @Around("pointA()")
    public void around(ProceedingJoinPoint joinPoint) throws Throwable {
        logger.info("around custom aspect");
        joinPoint.proceed();
    }
}
